import QtQuick 2.6
import QtQuick.Layouts 1.1

import "../../../Base/Config"
import "../../../Base/UiBase"

Item {
    id: root

    property int postId
    property string type
    property url source
    property string text

    height: 50 * Size.ratio

    RowLayout {
        anchors.fill: parent
        LoaderMouseArea {
            id: commentPageButton

            onClicked: {
                loader.source = "Comment/Index.qml"
                loader.item.postId = root.postId
                loader.item.type = root.type
                loader.item.source = root.source
                loader.item.text = root.text
            }

            Layout.fillWidth: true
            Layout.fillHeight: true

            loader: Loader {
                    parent:mainRoot
                    anchors.fill: parent
                }

            SvgzImage {
                id: submitCommentButton

                width: 355 * Size.ratio
                height: 50 * Size.ratio
                anchors.centerIn: parent

                source: parent.pressed ? "../../../../resources/evaluation/multi/dianping_02.svg" : "../../../../resources/evaluation/multi/dianping_01.svg"
            }
        }
    }

}
